package com.ymttest.common.order.userquery.util;

import org.springframework.data.mongodb.core.query.Field;

import com.mongodb.BasicDBObject;

public class MongoHelper {

	public static Field generateField(Field field, String...keys) {
		
		for (String key : keys)
			field.include(key);
		
		return field;
	}
	
	public static BasicDBObject generateField(BasicDBObject field, String...keys) {
		
		for (String key : keys)
			field.put(key, true);
		
		return field;
	}
	
	public static Field excludeField(Field field, String...keys) {
		
		for (String key : keys)
			field.exclude(key);
		
		return field;
	}
}
